<template>
  <div>
    <h2 v-text="msg" ref="title"></h2>
    <button ref="btn" @click="showElement">点我输出上方的dom元素</button>
    <School ref="school"/>
  </div>
</template>

<script>
import School from './components/School'

export default {
  name:'App',
  components:{
    School
  },
  data() {
    return {
      msg:'欢迎你来到'
    }
  },
  methods: {
    showElement(){
      console.log(this.$refs.school)
    }
  },
}
</script>

<style>

</style>